Skip to main content

waitDepth

Type

function

Summary

Returns the number of nested wait commands currently pending.

Syntax

the waitDepth
waitDepth()

Description

Use the waitDepth function to determine how many wait commands are currently awaiting completion.

The wait with messages form of the wait command, when used in a handler, pauses that handler while allowing LiveCode to execute other handlers while waiting. The waitDepth function indicates how many such statements are currently executing--that is, how many handlers are currently paused by a wait with messages statement.

If there are no paused handlers, the waitDepth function returns 1.

Examples

the waitDepth
if the waitDepth > 10 then beep

command: wait

control structure: function

glossary: handler, statement, command, return, execute

keyword: integer

Compatibility and Support

Introduced

LiveCode 1.1

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?